<template>
  <div class="search-bar">
    <div
      v-if="!$route.meta.noBack"
      @click="$router.back()"
    ></div>
    <div class="title">
      <van-search
        placeholder="嗷嗷叫商品"
        shape="round"
        show-action
      >
        <template #left>
          <van-icon name="scan" :style="{marginRight: '6px'}" />
        </template>
          <template #action>
           <van-icon name="contact" :style="{marginleft: '6px'}"/>
        </template>
      </van-search>
    </div>
  </div>
</template>
<script>
export default {
  name: 'SearchBar',
}
</script>

<style lang="less">
.search-bar {
    height: 80px;
    display: flex;
    align-items: center;

    .title {
      flex: 1;
      text-align: center;
      input {
        width: 98%;
      }
    }
  }
</style>
